home *** CD-ROM | disk | FTP | other *** search
- Path: rain.fr!world-net!usenet
- From: Frederic LACHASSE <lachass@worldnet.fr>
- Newsgroups: comp.lang.c++
- Subject: Re: [Help!] "Declaration syntax error" on interrupt program ?
- Date: Mon, 26 Feb 1996 20:16:18 +0000
- Organization: World-Net information exchange, Internet provider.
- Message-ID: <VA.0000004e.003df689@fred>
- References: <4gq1mk$8bl@jaring.my>
- Reply-To: lachass@worldnet.fr
- NNTP-Posting-Host: client35.sct.fr
- X-Newsreader: Virtual Access by Ashmount Research Ltd, http://www.ashmount.com
-
- In article <4gq1mk$8bl@jaring.my>, yinchau@pl.jaring.my (Choong Yin
- Chau) wrote:
- >
- > Below is an example program from the Turbo C++ 3.0 Online Help.
- > However when I run the program, an error message appeared at line
- > "#####" stating that there is some "declaration syntax error" that I
- > failed to find out.
- >
- > Can anyone help me with my first involvement in "interrupts". TQ.
- >
- > void interrupt (*mybeep)( void )
- > { #####
- > int i, j;
- [ rest of code snipped ]
-
- interrupt is just a modifier like _cdecl and _pascal, so standard
- declaration for functions must be used:
-
- void interrupt mybeep(void)
- {
- ...
- }
-
- What you do is to define a pointer to an interrupt function that returns
- void, then append a block of code. The compiler is right to complain.
-
- Frederic LACHASSE (ECP 86)
- CompuServe: 100530,2005
- Internet: lachass@worldnet.fr
-
-